package service;


import cn.ydt.ydt.common.resful.JsonPage;
import cn.ydt.ydt.pojo.work.dto.WorkDTO;
import cn.ydt.ydt.pojo.work.vo.WorkDetailsVO;
import cn.ydt.ydt.pojo.work.vo.WorkSimpleVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IWorkService {
    @Transactional

    void addNewWork(WorkDTO workDTO);

    WorkSimpleVO getByWorkId(Long workId);

    WorkDetailsVO getDetailsWork(Long workId);


    void finish(Long workId);

    void deleteByWorkID(Long workId);

    void deleteAllFinishWork();

    void giveWork(Long workId,Long volunteerId);
    /**
     * 查询类别列表
     * @param pageNum  页码
     * @param pageSize 每页记录数
     * @return 类别的列表，如果无记录，则返回长度为0的列表
     */
    JsonPage<WorkDetailsVO> listByWork(Integer pageNum, Integer pageSize);

    JsonPage<WorkDetailsVO> listNotFinishByWork(Integer pageNum, Integer pageSize);

    JsonPage<WorkSimpleVO> listByUserId(Long userId,Integer pageNum, Integer pageSize);

    List<WorkDetailsVO> listByVolunteerId();
}
